//
//  LeftTableViewCell.m
//  自定义collectionView
//
//  Created by apple on 15-1-4.
//  Copyright (c) 2015年 apple. All rights reserved.
//

#import "LeftTableViewCell.h"
#define kColorSet(r, g, b, a)       [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:a]
@implementation LeftTableViewCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier andTitleName:(NSString * )titleStr andColorFlag:(NSString *)flag
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        UILabel * lab = [[UILabel alloc]initWithFrame:CGRectMake(0, 2, 80, 40)];
        [self addSubview:lab];
        lab.text = titleStr ;
        lab.layer.borderColor = kColorSet(90, 160, 64, 1).CGColor;
        lab.layer.borderWidth = 0.5;
        lab.font = [UIFont fontWithName:@"Helvetica-Bold" size:14];
        lab.textAlignment = NSTextAlignmentCenter;
        
        lab.backgroundColor = kColorSet(90, 160, 64, 1);
        lab.textColor = [UIColor whiteColor];
        if ([flag isEqualToString:@"0"]) {
            lab.backgroundColor = [UIColor whiteColor];
            lab.textColor = kColorSet(90, 160, 64, 1);
        }
    }
    return self;
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
